package cn.tworice.netty.controller;


import cn.tworice.netty.message.Message;
import cn.tworice.netty.message.MessageManager;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

@RestController
@RequestMapping("/netty")
public class WebSocketController {

    @Resource
    private MessageManager messageManager;

    @RequestMapping("/push")
    public void push(Message message){
        messageManager.sendMessage(message);
    }

}
